
#include <assert.h>
#include "cmd_obj.h"
#include "gismapgatewayao_stub4app.h"
#include "gismapgatewayao_req_resp.h"


using namespace erp::gis::ao;

	
	uint32_t CGisMapGatewayAoStub4App::GetAliyunCoordinates(
				const CCntlInfo& rCntlInfo,

				const std::string& machineKey,
				const std::string& source,
				uint32_t sceneId,
				const erp::gis::po::CCoordinatesQueryPo& coordinatesQueryPo,
				const std::string& inReserve,
				std::vector<erp::gis::po::CCoordinatesPo >& coordinatesPo,
				std::string& errMsg,
				std::string& outReserve
	)
	{
	    CGisMapGatewayAoGetAliyunCoordinatesReq oReq;
			oReq.machineKey = machineKey;
			oReq.source = source;
			oReq.sceneId = sceneId;
			oReq.coordinatesQueryPo = coordinatesQueryPo;
			oReq.inReserve = inReserve;
			oReq.coordinatesPo = coordinatesPo;
			oReq.errMsg = errMsg;
			oReq.outReserve = outReserve;
	
		CCntlInfo* pCntlInfo = const_cast<CCntlInfo*>(&rCntlInfo);
	    m_pSvcCntl = reinterpret_cast<IServiceControl*>(pCntlInfo->getCntl());
	    if (m_pSvcCntl == NULL)
        {
            m_sErrMsg = "error, rCntlInfo is temporary variable";
            return 0xEE0041;
        }
	    int iRetCode = 0;
	    if((iRetCode = m_pSvcCntl->putSvcObj(&oReq, pCntlInfo->getRouteKey())) != 0)
	    {
	    	m_sErrMsg = "DoRequest failed.";
	        return iRetCode;
	    }
	
	    if((iRetCode = m_pSvcCntl->schedule()) != 0)
	    {
	        m_sErrMsg = "schedule failed.";
	        return 0xFFF2;
	    }
	    
	    CCmdObj& rCmd = m_pSvcCntl->getRespObj();
	    if(!rCmd.isValid(GISMAPGATEWAYAO_GETALIYUNCOORDINATES_RESP_CMD_ID))
	    {
	    	std::stringstream oss;
            oss << "Cmd not match: "
                << "expected cmd=" << std::hex << GISMAPGATEWAYAO_GETALIYUNCOORDINATES_RESP_CMD_ID << std::dec << " != "
                << "actualed cmd=" << std::hex << rCmd.getCmdId() << std::dec;
            m_sErrMsg = oss.str();
	        
	        return 0xEE0029;
	    }
	    
	    char* pBuf = NULL; uint32_t nLen = 0;
	    rCmd.getBuffer(pBuf, nLen);
	    CByteStreamNetwork bs(pBuf, nLen);
	    bs.isStoring(false);
	    
	    CGisMapGatewayAoGetAliyunCoordinatesResp oResp;
	    if(!oResp.Serialize(bs))
	    {
	        m_sErrMsg = "Resp.Serialize(bs) failed";
	        return 0xEE0030;
	    }
			coordinatesPo  = oResp.coordinatesPo;
			errMsg  = oResp.errMsg;
			outReserve  = oResp.outReserve;
	    
	    return oResp.dwResult;
	}
	uint32_t CGisMapGatewayAoStub4App::SendGetAliyunCoordinates(
				const CCntlInfo& rCntlInfo,

				const std::string& machineKey,
				const std::string& source,
				uint32_t sceneId,
				const erp::gis::po::CCoordinatesQueryPo& coordinatesQueryPo,
				const std::string& inReserve
	)
	{
	    CGisMapGatewayAoGetAliyunCoordinatesReq oReq;
			oReq.machineKey = machineKey;
			oReq.source = source;
			oReq.sceneId = sceneId;
			oReq.coordinatesQueryPo = coordinatesQueryPo;
			oReq.inReserve = inReserve;
	
		CCntlInfo* pCntlInfo = const_cast<CCntlInfo*>(&rCntlInfo);
	    m_pSvcCntl = reinterpret_cast<IServiceControl*>(pCntlInfo->getCntl());
	    if (m_pSvcCntl == NULL)
        {
            m_sErrMsg = "error, rCntlInfo is temporary variable";
            return 0xEE0041;
        }
	    int iRetCode = 0;
	    if((iRetCode = m_pSvcCntl->putSvcObj(&oReq, pCntlInfo->getRouteKey())) != 0)
	    {
	    	m_sErrMsg = "DoRequest failed.";
	        return iRetCode;
	    }
		return 0;
	}
	uint32_t CGisMapGatewayAoStub4App::RecvGetAliyunCoordinates(
				const CCntlInfo& rCntlInfo,
				std::vector<erp::gis::po::CCoordinatesPo >& coordinatesPo,
				std::string& errMsg,
				std::string& outReserve
	)
	{
		CCntlInfo* pCntlInfo = const_cast<CCntlInfo*>(&rCntlInfo);
	    m_pSvcCntl = reinterpret_cast<IServiceControl*>(pCntlInfo->getCntl());
	    CCmdObj& rCmd = m_pSvcCntl->getRespObj();
	    if(!rCmd.isValid(GISMAPGATEWAYAO_GETALIYUNCOORDINATES_RESP_CMD_ID))
	    {
	    	std::stringstream oss;
            oss << "Cmd not match: "
                << "expected cmd=" << std::hex << GISMAPGATEWAYAO_GETALIYUNCOORDINATES_RESP_CMD_ID << std::dec << " != "
                << "actualed cmd=" << std::hex << rCmd.getCmdId() << std::dec;
            m_sErrMsg = oss.str();
	        
	        return 0xEE0031;
	    }
	    
	    char* pBuf = NULL; uint32_t nLen = 0;
	    rCmd.getBuffer(pBuf, nLen);
	    CByteStreamNetwork bs(pBuf, nLen);
	    bs.isStoring(false);
	    
	    CGisMapGatewayAoGetAliyunCoordinatesResp oResp;
	    if(!oResp.Serialize(bs))
	    {
	        m_sErrMsg = "Resp.Serialize(bs) failed";
	        return 0xEE0032;
	    }
			coordinatesPo  = oResp.coordinatesPo;
			errMsg  = oResp.errMsg;
			outReserve  = oResp.outReserve;
	    
	    return oResp.dwResult;
	}
	
	uint32_t CGisMapGatewayAoStub4App::RecvGetAliyunCoordinates(
				CCmdObj& rCmd,
				std::vector<erp::gis::po::CCoordinatesPo >& coordinatesPo,
				std::string& errMsg,
				std::string& outReserve
	)
	{	    
	    char* pBuf = NULL; uint32_t nLen = 0;
	    rCmd.getBuffer(pBuf, nLen);
	    CByteStreamNetwork bs(pBuf, nLen);
	    bs.isStoring(false);
	    
	    CGisMapGatewayAoGetAliyunCoordinatesResp oResp;
	    if(!oResp.Serialize(bs))
	    {
	        m_sErrMsg = "Resp.Serialize(bs) failed";
	        return 0xEE0033;
	    }
			coordinatesPo  = oResp.coordinatesPo;
			errMsg  = oResp.errMsg;
			outReserve  = oResp.outReserve;
	    
	    return oResp.dwResult;
	}
	
	uint32_t CGisMapGatewayAoStub4App::GetGetAliyunCoordinatesRespCmd(
	)
	{	    
	    return GISMAPGATEWAYAO_GETALIYUNCOORDINATES_RESP_CMD_ID;
	}	
	
	uint32_t CGisMapGatewayAoStub4App::GetBaiduCoordinates(
				const CCntlInfo& rCntlInfo,

				const std::string& machineKey,
				const std::string& source,
				uint32_t sceneId,
				const erp::gis::po::CCoordinatesQueryPo& coordinatesQueryPo,
				const std::string& inReserve,
				std::vector<erp::gis::po::CCoordinatesPo >& coordinatesPo,
				std::string& errMsg,
				std::string& outReserve
	)
	{
	    CGisMapGatewayAoGetBaiduCoordinatesReq oReq;
			oReq.machineKey = machineKey;
			oReq.source = source;
			oReq.sceneId = sceneId;
			oReq.coordinatesQueryPo = coordinatesQueryPo;
			oReq.inReserve = inReserve;
			oReq.coordinatesPo = coordinatesPo;
			oReq.errMsg = errMsg;
			oReq.outReserve = outReserve;
	
		CCntlInfo* pCntlInfo = const_cast<CCntlInfo*>(&rCntlInfo);
	    m_pSvcCntl = reinterpret_cast<IServiceControl*>(pCntlInfo->getCntl());
	    if (m_pSvcCntl == NULL)
        {
            m_sErrMsg = "error, rCntlInfo is temporary variable";
            return 0xEE0041;
        }
	    int iRetCode = 0;
	    if((iRetCode = m_pSvcCntl->putSvcObj(&oReq, pCntlInfo->getRouteKey())) != 0)
	    {
	    	m_sErrMsg = "DoRequest failed.";
	        return iRetCode;
	    }
	
	    if((iRetCode = m_pSvcCntl->schedule()) != 0)
	    {
	        m_sErrMsg = "schedule failed.";
	        return 0xFFF2;
	    }
	    
	    CCmdObj& rCmd = m_pSvcCntl->getRespObj();
	    if(!rCmd.isValid(GISMAPGATEWAYAO_GETBAIDUCOORDINATES_RESP_CMD_ID))
	    {
	    	std::stringstream oss;
            oss << "Cmd not match: "
                << "expected cmd=" << std::hex << GISMAPGATEWAYAO_GETBAIDUCOORDINATES_RESP_CMD_ID << std::dec << " != "
                << "actualed cmd=" << std::hex << rCmd.getCmdId() << std::dec;
            m_sErrMsg = oss.str();
	        
	        return 0xEE0029;
	    }
	    
	    char* pBuf = NULL; uint32_t nLen = 0;
	    rCmd.getBuffer(pBuf, nLen);
	    CByteStreamNetwork bs(pBuf, nLen);
	    bs.isStoring(false);
	    
	    CGisMapGatewayAoGetBaiduCoordinatesResp oResp;
	    if(!oResp.Serialize(bs))
	    {
	        m_sErrMsg = "Resp.Serialize(bs) failed";
	        return 0xEE0030;
	    }
			coordinatesPo  = oResp.coordinatesPo;
			errMsg  = oResp.errMsg;
			outReserve  = oResp.outReserve;
	    
	    return oResp.dwResult;
	}
	uint32_t CGisMapGatewayAoStub4App::SendGetBaiduCoordinates(
				const CCntlInfo& rCntlInfo,

				const std::string& machineKey,
				const std::string& source,
				uint32_t sceneId,
				const erp::gis::po::CCoordinatesQueryPo& coordinatesQueryPo,
				const std::string& inReserve
	)
	{
	    CGisMapGatewayAoGetBaiduCoordinatesReq oReq;
			oReq.machineKey = machineKey;
			oReq.source = source;
			oReq.sceneId = sceneId;
			oReq.coordinatesQueryPo = coordinatesQueryPo;
			oReq.inReserve = inReserve;
	
		CCntlInfo* pCntlInfo = const_cast<CCntlInfo*>(&rCntlInfo);
	    m_pSvcCntl = reinterpret_cast<IServiceControl*>(pCntlInfo->getCntl());
	    if (m_pSvcCntl == NULL)
        {
            m_sErrMsg = "error, rCntlInfo is temporary variable";
            return 0xEE0041;
        }
	    int iRetCode = 0;
	    if((iRetCode = m_pSvcCntl->putSvcObj(&oReq, pCntlInfo->getRouteKey())) != 0)
	    {
	    	m_sErrMsg = "DoRequest failed.";
	        return iRetCode;
	    }
		return 0;
	}
	uint32_t CGisMapGatewayAoStub4App::RecvGetBaiduCoordinates(
				const CCntlInfo& rCntlInfo,
				std::vector<erp::gis::po::CCoordinatesPo >& coordinatesPo,
				std::string& errMsg,
				std::string& outReserve
	)
	{
		CCntlInfo* pCntlInfo = const_cast<CCntlInfo*>(&rCntlInfo);
	    m_pSvcCntl = reinterpret_cast<IServiceControl*>(pCntlInfo->getCntl());
	    CCmdObj& rCmd = m_pSvcCntl->getRespObj();
	    if(!rCmd.isValid(GISMAPGATEWAYAO_GETBAIDUCOORDINATES_RESP_CMD_ID))
	    {
	    	std::stringstream oss;
            oss << "Cmd not match: "
                << "expected cmd=" << std::hex << GISMAPGATEWAYAO_GETBAIDUCOORDINATES_RESP_CMD_ID << std::dec << " != "
                << "actualed cmd=" << std::hex << rCmd.getCmdId() << std::dec;
            m_sErrMsg = oss.str();
	        
	        return 0xEE0031;
	    }
	    
	    char* pBuf = NULL; uint32_t nLen = 0;
	    rCmd.getBuffer(pBuf, nLen);
	    CByteStreamNetwork bs(pBuf, nLen);
	    bs.isStoring(false);
	    
	    CGisMapGatewayAoGetBaiduCoordinatesResp oResp;
	    if(!oResp.Serialize(bs))
	    {
	        m_sErrMsg = "Resp.Serialize(bs) failed";
	        return 0xEE0032;
	    }
			coordinatesPo  = oResp.coordinatesPo;
			errMsg  = oResp.errMsg;
			outReserve  = oResp.outReserve;
	    
	    return oResp.dwResult;
	}
	
	uint32_t CGisMapGatewayAoStub4App::RecvGetBaiduCoordinates(
				CCmdObj& rCmd,
				std::vector<erp::gis::po::CCoordinatesPo >& coordinatesPo,
				std::string& errMsg,
				std::string& outReserve
	)
	{	    
	    char* pBuf = NULL; uint32_t nLen = 0;
	    rCmd.getBuffer(pBuf, nLen);
	    CByteStreamNetwork bs(pBuf, nLen);
	    bs.isStoring(false);
	    
	    CGisMapGatewayAoGetBaiduCoordinatesResp oResp;
	    if(!oResp.Serialize(bs))
	    {
	        m_sErrMsg = "Resp.Serialize(bs) failed";
	        return 0xEE0033;
	    }
			coordinatesPo  = oResp.coordinatesPo;
			errMsg  = oResp.errMsg;
			outReserve  = oResp.outReserve;
	    
	    return oResp.dwResult;
	}
	
	uint32_t CGisMapGatewayAoStub4App::GetGetBaiduCoordinatesRespCmd(
	)
	{	    
	    return GISMAPGATEWAYAO_GETBAIDUCOORDINATES_RESP_CMD_ID;
	}	
	
	uint32_t CGisMapGatewayAoStub4App::GetGaodeCoordinates(
				const CCntlInfo& rCntlInfo,

				const std::string& machineKey,
				const std::string& source,
				uint32_t sceneId,
				const erp::gis::po::CCoordinatesQueryPo& coordinatesQueryPo,
				const std::string& inReserve,
				std::vector<erp::gis::po::CCoordinatesPo >& coordinatesPo,
				std::string& errMsg,
				std::string& outReserve
	)
	{
	    CGisMapGatewayAoGetGaodeCoordinatesReq oReq;
			oReq.machineKey = machineKey;
			oReq.source = source;
			oReq.sceneId = sceneId;
			oReq.coordinatesQueryPo = coordinatesQueryPo;
			oReq.inReserve = inReserve;
			oReq.coordinatesPo = coordinatesPo;
			oReq.errMsg = errMsg;
			oReq.outReserve = outReserve;
	
		CCntlInfo* pCntlInfo = const_cast<CCntlInfo*>(&rCntlInfo);
	    m_pSvcCntl = reinterpret_cast<IServiceControl*>(pCntlInfo->getCntl());
	    if (m_pSvcCntl == NULL)
        {
            m_sErrMsg = "error, rCntlInfo is temporary variable";
            return 0xEE0041;
        }
	    int iRetCode = 0;
	    if((iRetCode = m_pSvcCntl->putSvcObj(&oReq, pCntlInfo->getRouteKey())) != 0)
	    {
	    	m_sErrMsg = "DoRequest failed.";
	        return iRetCode;
	    }
	
	    if((iRetCode = m_pSvcCntl->schedule()) != 0)
	    {
	        m_sErrMsg = "schedule failed.";
	        return 0xFFF2;
	    }
	    
	    CCmdObj& rCmd = m_pSvcCntl->getRespObj();
	    if(!rCmd.isValid(GISMAPGATEWAYAO_GETGAODECOORDINATES_RESP_CMD_ID))
	    {
	    	std::stringstream oss;
            oss << "Cmd not match: "
                << "expected cmd=" << std::hex << GISMAPGATEWAYAO_GETGAODECOORDINATES_RESP_CMD_ID << std::dec << " != "
                << "actualed cmd=" << std::hex << rCmd.getCmdId() << std::dec;
            m_sErrMsg = oss.str();
	        
	        return 0xEE0029;
	    }
	    
	    char* pBuf = NULL; uint32_t nLen = 0;
	    rCmd.getBuffer(pBuf, nLen);
	    CByteStreamNetwork bs(pBuf, nLen);
	    bs.isStoring(false);
	    
	    CGisMapGatewayAoGetGaodeCoordinatesResp oResp;
	    if(!oResp.Serialize(bs))
	    {
	        m_sErrMsg = "Resp.Serialize(bs) failed";
	        return 0xEE0030;
	    }
			coordinatesPo  = oResp.coordinatesPo;
			errMsg  = oResp.errMsg;
			outReserve  = oResp.outReserve;
	    
	    return oResp.dwResult;
	}
	uint32_t CGisMapGatewayAoStub4App::SendGetGaodeCoordinates(
				const CCntlInfo& rCntlInfo,

				const std::string& machineKey,
				const std::string& source,
				uint32_t sceneId,
				const erp::gis::po::CCoordinatesQueryPo& coordinatesQueryPo,
				const std::string& inReserve
	)
	{
	    CGisMapGatewayAoGetGaodeCoordinatesReq oReq;
			oReq.machineKey = machineKey;
			oReq.source = source;
			oReq.sceneId = sceneId;
			oReq.coordinatesQueryPo = coordinatesQueryPo;
			oReq.inReserve = inReserve;
	
		CCntlInfo* pCntlInfo = const_cast<CCntlInfo*>(&rCntlInfo);
	    m_pSvcCntl = reinterpret_cast<IServiceControl*>(pCntlInfo->getCntl());
	    if (m_pSvcCntl == NULL)
        {
            m_sErrMsg = "error, rCntlInfo is temporary variable";
            return 0xEE0041;
        }
	    int iRetCode = 0;
	    if((iRetCode = m_pSvcCntl->putSvcObj(&oReq, pCntlInfo->getRouteKey())) != 0)
	    {
	    	m_sErrMsg = "DoRequest failed.";
	        return iRetCode;
	    }
		return 0;
	}
	uint32_t CGisMapGatewayAoStub4App::RecvGetGaodeCoordinates(
				const CCntlInfo& rCntlInfo,
				std::vector<erp::gis::po::CCoordinatesPo >& coordinatesPo,
				std::string& errMsg,
				std::string& outReserve
	)
	{
		CCntlInfo* pCntlInfo = const_cast<CCntlInfo*>(&rCntlInfo);
	    m_pSvcCntl = reinterpret_cast<IServiceControl*>(pCntlInfo->getCntl());
	    CCmdObj& rCmd = m_pSvcCntl->getRespObj();
	    if(!rCmd.isValid(GISMAPGATEWAYAO_GETGAODECOORDINATES_RESP_CMD_ID))
	    {
	    	std::stringstream oss;
            oss << "Cmd not match: "
                << "expected cmd=" << std::hex << GISMAPGATEWAYAO_GETGAODECOORDINATES_RESP_CMD_ID << std::dec << " != "
                << "actualed cmd=" << std::hex << rCmd.getCmdId() << std::dec;
            m_sErrMsg = oss.str();
	        
	        return 0xEE0031;
	    }
	    
	    char* pBuf = NULL; uint32_t nLen = 0;
	    rCmd.getBuffer(pBuf, nLen);
	    CByteStreamNetwork bs(pBuf, nLen);
	    bs.isStoring(false);
	    
	    CGisMapGatewayAoGetGaodeCoordinatesResp oResp;
	    if(!oResp.Serialize(bs))
	    {
	        m_sErrMsg = "Resp.Serialize(bs) failed";
	        return 0xEE0032;
	    }
			coordinatesPo  = oResp.coordinatesPo;
			errMsg  = oResp.errMsg;
			outReserve  = oResp.outReserve;
	    
	    return oResp.dwResult;
	}
	
	uint32_t CGisMapGatewayAoStub4App::RecvGetGaodeCoordinates(
				CCmdObj& rCmd,
				std::vector<erp::gis::po::CCoordinatesPo >& coordinatesPo,
				std::string& errMsg,
				std::string& outReserve
	)
	{	    
	    char* pBuf = NULL; uint32_t nLen = 0;
	    rCmd.getBuffer(pBuf, nLen);
	    CByteStreamNetwork bs(pBuf, nLen);
	    bs.isStoring(false);
	    
	    CGisMapGatewayAoGetGaodeCoordinatesResp oResp;
	    if(!oResp.Serialize(bs))
	    {
	        m_sErrMsg = "Resp.Serialize(bs) failed";
	        return 0xEE0033;
	    }
			coordinatesPo  = oResp.coordinatesPo;
			errMsg  = oResp.errMsg;
			outReserve  = oResp.outReserve;
	    
	    return oResp.dwResult;
	}
	
	uint32_t CGisMapGatewayAoStub4App::GetGetGaodeCoordinatesRespCmd(
	)
	{	    
	    return GISMAPGATEWAYAO_GETGAODECOORDINATES_RESP_CMD_ID;
	}	
	
	uint32_t CGisMapGatewayAoStub4App::GetGoogleCoordinates(
				const CCntlInfo& rCntlInfo,

				const std::string& machineKey,
				const std::string& source,
				uint32_t sceneId,
				const erp::gis::po::CCoordinatesQueryPo& coordinatesQueryPo,
				const std::string& inReserve,
				std::vector<erp::gis::po::CCoordinatesPo >& coordinatesPo,
				std::string& errMsg,
				std::string& outReserve
	)
	{
	    CGisMapGatewayAoGetGoogleCoordinatesReq oReq;
			oReq.machineKey = machineKey;
			oReq.source = source;
			oReq.sceneId = sceneId;
			oReq.coordinatesQueryPo = coordinatesQueryPo;
			oReq.inReserve = inReserve;
			oReq.coordinatesPo = coordinatesPo;
			oReq.errMsg = errMsg;
			oReq.outReserve = outReserve;
	
		CCntlInfo* pCntlInfo = const_cast<CCntlInfo*>(&rCntlInfo);
	    m_pSvcCntl = reinterpret_cast<IServiceControl*>(pCntlInfo->getCntl());
	    if (m_pSvcCntl == NULL)
        {
            m_sErrMsg = "error, rCntlInfo is temporary variable";
            return 0xEE0041;
        }
	    int iRetCode = 0;
	    if((iRetCode = m_pSvcCntl->putSvcObj(&oReq, pCntlInfo->getRouteKey())) != 0)
	    {
	    	m_sErrMsg = "DoRequest failed.";
	        return iRetCode;
	    }
	
	    if((iRetCode = m_pSvcCntl->schedule()) != 0)
	    {
	        m_sErrMsg = "schedule failed.";
	        return 0xFFF2;
	    }
	    
	    CCmdObj& rCmd = m_pSvcCntl->getRespObj();
	    if(!rCmd.isValid(GISMAPGATEWAYAO_GETGOOGLECOORDINATES_RESP_CMD_ID))
	    {
	    	std::stringstream oss;
            oss << "Cmd not match: "
                << "expected cmd=" << std::hex << GISMAPGATEWAYAO_GETGOOGLECOORDINATES_RESP_CMD_ID << std::dec << " != "
                << "actualed cmd=" << std::hex << rCmd.getCmdId() << std::dec;
            m_sErrMsg = oss.str();
	        
	        return 0xEE0029;
	    }
	    
	    char* pBuf = NULL; uint32_t nLen = 0;
	    rCmd.getBuffer(pBuf, nLen);
	    CByteStreamNetwork bs(pBuf, nLen);
	    bs.isStoring(false);
	    
	    CGisMapGatewayAoGetGoogleCoordinatesResp oResp;
	    if(!oResp.Serialize(bs))
	    {
	        m_sErrMsg = "Resp.Serialize(bs) failed";
	        return 0xEE0030;
	    }
			coordinatesPo  = oResp.coordinatesPo;
			errMsg  = oResp.errMsg;
			outReserve  = oResp.outReserve;
	    
	    return oResp.dwResult;
	}
	uint32_t CGisMapGatewayAoStub4App::SendGetGoogleCoordinates(
				const CCntlInfo& rCntlInfo,

				const std::string& machineKey,
				const std::string& source,
				uint32_t sceneId,
				const erp::gis::po::CCoordinatesQueryPo& coordinatesQueryPo,
				const std::string& inReserve
	)
	{
	    CGisMapGatewayAoGetGoogleCoordinatesReq oReq;
			oReq.machineKey = machineKey;
			oReq.source = source;
			oReq.sceneId = sceneId;
			oReq.coordinatesQueryPo = coordinatesQueryPo;
			oReq.inReserve = inReserve;
	
		CCntlInfo* pCntlInfo = const_cast<CCntlInfo*>(&rCntlInfo);
	    m_pSvcCntl = reinterpret_cast<IServiceControl*>(pCntlInfo->getCntl());
	    if (m_pSvcCntl == NULL)
        {
            m_sErrMsg = "error, rCntlInfo is temporary variable";
            return 0xEE0041;
        }
	    int iRetCode = 0;
	    if((iRetCode = m_pSvcCntl->putSvcObj(&oReq, pCntlInfo->getRouteKey())) != 0)
	    {
	    	m_sErrMsg = "DoRequest failed.";
	        return iRetCode;
	    }
		return 0;
	}
	uint32_t CGisMapGatewayAoStub4App::RecvGetGoogleCoordinates(
				const CCntlInfo& rCntlInfo,
				std::vector<erp::gis::po::CCoordinatesPo >& coordinatesPo,
				std::string& errMsg,
				std::string& outReserve
	)
	{
		CCntlInfo* pCntlInfo = const_cast<CCntlInfo*>(&rCntlInfo);
	    m_pSvcCntl = reinterpret_cast<IServiceControl*>(pCntlInfo->getCntl());
	    CCmdObj& rCmd = m_pSvcCntl->getRespObj();
	    if(!rCmd.isValid(GISMAPGATEWAYAO_GETGOOGLECOORDINATES_RESP_CMD_ID))
	    {
	    	std::stringstream oss;
            oss << "Cmd not match: "
                << "expected cmd=" << std::hex << GISMAPGATEWAYAO_GETGOOGLECOORDINATES_RESP_CMD_ID << std::dec << " != "
                << "actualed cmd=" << std::hex << rCmd.getCmdId() << std::dec;
            m_sErrMsg = oss.str();
	        
	        return 0xEE0031;
	    }
	    
	    char* pBuf = NULL; uint32_t nLen = 0;
	    rCmd.getBuffer(pBuf, nLen);
	    CByteStreamNetwork bs(pBuf, nLen);
	    bs.isStoring(false);
	    
	    CGisMapGatewayAoGetGoogleCoordinatesResp oResp;
	    if(!oResp.Serialize(bs))
	    {
	        m_sErrMsg = "Resp.Serialize(bs) failed";
	        return 0xEE0032;
	    }
			coordinatesPo  = oResp.coordinatesPo;
			errMsg  = oResp.errMsg;
			outReserve  = oResp.outReserve;
	    
	    return oResp.dwResult;
	}
	
	uint32_t CGisMapGatewayAoStub4App::RecvGetGoogleCoordinates(
				CCmdObj& rCmd,
				std::vector<erp::gis::po::CCoordinatesPo >& coordinatesPo,
				std::string& errMsg,
				std::string& outReserve
	)
	{	    
	    char* pBuf = NULL; uint32_t nLen = 0;
	    rCmd.getBuffer(pBuf, nLen);
	    CByteStreamNetwork bs(pBuf, nLen);
	    bs.isStoring(false);
	    
	    CGisMapGatewayAoGetGoogleCoordinatesResp oResp;
	    if(!oResp.Serialize(bs))
	    {
	        m_sErrMsg = "Resp.Serialize(bs) failed";
	        return 0xEE0033;
	    }
			coordinatesPo  = oResp.coordinatesPo;
			errMsg  = oResp.errMsg;
			outReserve  = oResp.outReserve;
	    
	    return oResp.dwResult;
	}
	
	uint32_t CGisMapGatewayAoStub4App::GetGetGoogleCoordinatesRespCmd(
	)
	{	    
	    return GISMAPGATEWAYAO_GETGOOGLECOORDINATES_RESP_CMD_ID;
	}	
	
	uint32_t CGisMapGatewayAoStub4App::GetSoso2Coordinates(
				const CCntlInfo& rCntlInfo,

				const std::string& machineKey,
				const std::string& source,
				uint32_t sceneId,
				const erp::gis::po::CCoordinatesQueryPo& coordinatesQueryPo,
				const std::string& inReserve,
				std::vector<erp::gis::po::CCoordinatesPo >& coordinatesPo,
				std::string& errMsg,
				std::string& outReserve
	)
	{
	    CGisMapGatewayAoGetSoso2CoordinatesReq oReq;
			oReq.machineKey = machineKey;
			oReq.source = source;
			oReq.sceneId = sceneId;
			oReq.coordinatesQueryPo = coordinatesQueryPo;
			oReq.inReserve = inReserve;
			oReq.coordinatesPo = coordinatesPo;
			oReq.errMsg = errMsg;
			oReq.outReserve = outReserve;
	
		CCntlInfo* pCntlInfo = const_cast<CCntlInfo*>(&rCntlInfo);
	    m_pSvcCntl = reinterpret_cast<IServiceControl*>(pCntlInfo->getCntl());
	    if (m_pSvcCntl == NULL)
        {
            m_sErrMsg = "error, rCntlInfo is temporary variable";
            return 0xEE0041;
        }
	    int iRetCode = 0;
	    if((iRetCode = m_pSvcCntl->putSvcObj(&oReq, pCntlInfo->getRouteKey())) != 0)
	    {
	    	m_sErrMsg = "DoRequest failed.";
	        return iRetCode;
	    }
	
	    if((iRetCode = m_pSvcCntl->schedule()) != 0)
	    {
	        m_sErrMsg = "schedule failed.";
	        return 0xFFF2;
	    }
	    
	    CCmdObj& rCmd = m_pSvcCntl->getRespObj();
	    if(!rCmd.isValid(GISMAPGATEWAYAO_GETSOSO2COORDINATES_RESP_CMD_ID))
	    {
	    	std::stringstream oss;
            oss << "Cmd not match: "
                << "expected cmd=" << std::hex << GISMAPGATEWAYAO_GETSOSO2COORDINATES_RESP_CMD_ID << std::dec << " != "
                << "actualed cmd=" << std::hex << rCmd.getCmdId() << std::dec;
            m_sErrMsg = oss.str();
	        
	        return 0xEE0029;
	    }
	    
	    char* pBuf = NULL; uint32_t nLen = 0;
	    rCmd.getBuffer(pBuf, nLen);
	    CByteStreamNetwork bs(pBuf, nLen);
	    bs.isStoring(false);
	    
	    CGisMapGatewayAoGetSoso2CoordinatesResp oResp;
	    if(!oResp.Serialize(bs))
	    {
	        m_sErrMsg = "Resp.Serialize(bs) failed";
	        return 0xEE0030;
	    }
			coordinatesPo  = oResp.coordinatesPo;
			errMsg  = oResp.errMsg;
			outReserve  = oResp.outReserve;
	    
	    return oResp.dwResult;
	}
	uint32_t CGisMapGatewayAoStub4App::SendGetSoso2Coordinates(
				const CCntlInfo& rCntlInfo,

				const std::string& machineKey,
				const std::string& source,
				uint32_t sceneId,
				const erp::gis::po::CCoordinatesQueryPo& coordinatesQueryPo,
				const std::string& inReserve
	)
	{
	    CGisMapGatewayAoGetSoso2CoordinatesReq oReq;
			oReq.machineKey = machineKey;
			oReq.source = source;
			oReq.sceneId = sceneId;
			oReq.coordinatesQueryPo = coordinatesQueryPo;
			oReq.inReserve = inReserve;
	
		CCntlInfo* pCntlInfo = const_cast<CCntlInfo*>(&rCntlInfo);
	    m_pSvcCntl = reinterpret_cast<IServiceControl*>(pCntlInfo->getCntl());
	    if (m_pSvcCntl == NULL)
        {
            m_sErrMsg = "error, rCntlInfo is temporary variable";
            return 0xEE0041;
        }
	    int iRetCode = 0;
	    if((iRetCode = m_pSvcCntl->putSvcObj(&oReq, pCntlInfo->getRouteKey())) != 0)
	    {
	    	m_sErrMsg = "DoRequest failed.";
	        return iRetCode;
	    }
		return 0;
	}
	uint32_t CGisMapGatewayAoStub4App::RecvGetSoso2Coordinates(
				const CCntlInfo& rCntlInfo,
				std::vector<erp::gis::po::CCoordinatesPo >& coordinatesPo,
				std::string& errMsg,
				std::string& outReserve
	)
	{
		CCntlInfo* pCntlInfo = const_cast<CCntlInfo*>(&rCntlInfo);
	    m_pSvcCntl = reinterpret_cast<IServiceControl*>(pCntlInfo->getCntl());
	    CCmdObj& rCmd = m_pSvcCntl->getRespObj();
	    if(!rCmd.isValid(GISMAPGATEWAYAO_GETSOSO2COORDINATES_RESP_CMD_ID))
	    {
	    	std::stringstream oss;
            oss << "Cmd not match: "
                << "expected cmd=" << std::hex << GISMAPGATEWAYAO_GETSOSO2COORDINATES_RESP_CMD_ID << std::dec << " != "
                << "actualed cmd=" << std::hex << rCmd.getCmdId() << std::dec;
            m_sErrMsg = oss.str();
	        
	        return 0xEE0031;
	    }
	    
	    char* pBuf = NULL; uint32_t nLen = 0;
	    rCmd.getBuffer(pBuf, nLen);
	    CByteStreamNetwork bs(pBuf, nLen);
	    bs.isStoring(false);
	    
	    CGisMapGatewayAoGetSoso2CoordinatesResp oResp;
	    if(!oResp.Serialize(bs))
	    {
	        m_sErrMsg = "Resp.Serialize(bs) failed";
	        return 0xEE0032;
	    }
			coordinatesPo  = oResp.coordinatesPo;
			errMsg  = oResp.errMsg;
			outReserve  = oResp.outReserve;
	    
	    return oResp.dwResult;
	}
	
	uint32_t CGisMapGatewayAoStub4App::RecvGetSoso2Coordinates(
				CCmdObj& rCmd,
				std::vector<erp::gis::po::CCoordinatesPo >& coordinatesPo,
				std::string& errMsg,
				std::string& outReserve
	)
	{	    
	    char* pBuf = NULL; uint32_t nLen = 0;
	    rCmd.getBuffer(pBuf, nLen);
	    CByteStreamNetwork bs(pBuf, nLen);
	    bs.isStoring(false);
	    
	    CGisMapGatewayAoGetSoso2CoordinatesResp oResp;
	    if(!oResp.Serialize(bs))
	    {
	        m_sErrMsg = "Resp.Serialize(bs) failed";
	        return 0xEE0033;
	    }
			coordinatesPo  = oResp.coordinatesPo;
			errMsg  = oResp.errMsg;
			outReserve  = oResp.outReserve;
	    
	    return oResp.dwResult;
	}
	
	uint32_t CGisMapGatewayAoStub4App::GetGetSoso2CoordinatesRespCmd(
	)
	{	    
	    return GISMAPGATEWAYAO_GETSOSO2COORDINATES_RESP_CMD_ID;
	}	
	
	uint32_t CGisMapGatewayAoStub4App::GetSosoCoordinates(
				const CCntlInfo& rCntlInfo,

				const std::string& machineKey,
				const std::string& source,
				uint32_t sceneId,
				const erp::gis::po::CCoordinatesQueryPo& coordinatesQueryPo,
				const std::string& inReserve,
				std::vector<erp::gis::po::CCoordinatesPo >& coordinatesPo,
				std::string& errMsg,
				std::string& outReserve
	)
	{
	    CGisMapGatewayAoGetSosoCoordinatesReq oReq;
			oReq.machineKey = machineKey;
			oReq.source = source;
			oReq.sceneId = sceneId;
			oReq.coordinatesQueryPo = coordinatesQueryPo;
			oReq.inReserve = inReserve;
			oReq.coordinatesPo = coordinatesPo;
			oReq.errMsg = errMsg;
			oReq.outReserve = outReserve;
	
		CCntlInfo* pCntlInfo = const_cast<CCntlInfo*>(&rCntlInfo);
	    m_pSvcCntl = reinterpret_cast<IServiceControl*>(pCntlInfo->getCntl());
	    if (m_pSvcCntl == NULL)
        {
            m_sErrMsg = "error, rCntlInfo is temporary variable";
            return 0xEE0041;
        }
	    int iRetCode = 0;
	    if((iRetCode = m_pSvcCntl->putSvcObj(&oReq, pCntlInfo->getRouteKey())) != 0)
	    {
	    	m_sErrMsg = "DoRequest failed.";
	        return iRetCode;
	    }
	
	    if((iRetCode = m_pSvcCntl->schedule()) != 0)
	    {
	        m_sErrMsg = "schedule failed.";
	        return 0xFFF2;
	    }
	    
	    CCmdObj& rCmd = m_pSvcCntl->getRespObj();
	    if(!rCmd.isValid(GISMAPGATEWAYAO_GETSOSOCOORDINATES_RESP_CMD_ID))
	    {
	    	std::stringstream oss;
            oss << "Cmd not match: "
                << "expected cmd=" << std::hex << GISMAPGATEWAYAO_GETSOSOCOORDINATES_RESP_CMD_ID << std::dec << " != "
                << "actualed cmd=" << std::hex << rCmd.getCmdId() << std::dec;
            m_sErrMsg = oss.str();
	        
	        return 0xEE0029;
	    }
	    
	    char* pBuf = NULL; uint32_t nLen = 0;
	    rCmd.getBuffer(pBuf, nLen);
	    CByteStreamNetwork bs(pBuf, nLen);
	    bs.isStoring(false);
	    
	    CGisMapGatewayAoGetSosoCoordinatesResp oResp;
	    if(!oResp.Serialize(bs))
	    {
	        m_sErrMsg = "Resp.Serialize(bs) failed";
	        return 0xEE0030;
	    }
			coordinatesPo  = oResp.coordinatesPo;
			errMsg  = oResp.errMsg;
			outReserve  = oResp.outReserve;
	    
	    return oResp.dwResult;
	}
	uint32_t CGisMapGatewayAoStub4App::SendGetSosoCoordinates(
				const CCntlInfo& rCntlInfo,

				const std::string& machineKey,
				const std::string& source,
				uint32_t sceneId,
				const erp::gis::po::CCoordinatesQueryPo& coordinatesQueryPo,
				const std::string& inReserve
	)
	{
	    CGisMapGatewayAoGetSosoCoordinatesReq oReq;
			oReq.machineKey = machineKey;
			oReq.source = source;
			oReq.sceneId = sceneId;
			oReq.coordinatesQueryPo = coordinatesQueryPo;
			oReq.inReserve = inReserve;
	
		CCntlInfo* pCntlInfo = const_cast<CCntlInfo*>(&rCntlInfo);
	    m_pSvcCntl = reinterpret_cast<IServiceControl*>(pCntlInfo->getCntl());
	    if (m_pSvcCntl == NULL)
        {
            m_sErrMsg = "error, rCntlInfo is temporary variable";
            return 0xEE0041;
        }
	    int iRetCode = 0;
	    if((iRetCode = m_pSvcCntl->putSvcObj(&oReq, pCntlInfo->getRouteKey())) != 0)
	    {
	    	m_sErrMsg = "DoRequest failed.";
	        return iRetCode;
	    }
		return 0;
	}
	uint32_t CGisMapGatewayAoStub4App::RecvGetSosoCoordinates(
				const CCntlInfo& rCntlInfo,
				std::vector<erp::gis::po::CCoordinatesPo >& coordinatesPo,
				std::string& errMsg,
				std::string& outReserve
	)
	{
		CCntlInfo* pCntlInfo = const_cast<CCntlInfo*>(&rCntlInfo);
	    m_pSvcCntl = reinterpret_cast<IServiceControl*>(pCntlInfo->getCntl());
	    CCmdObj& rCmd = m_pSvcCntl->getRespObj();
	    if(!rCmd.isValid(GISMAPGATEWAYAO_GETSOSOCOORDINATES_RESP_CMD_ID))
	    {
	    	std::stringstream oss;
            oss << "Cmd not match: "
                << "expected cmd=" << std::hex << GISMAPGATEWAYAO_GETSOSOCOORDINATES_RESP_CMD_ID << std::dec << " != "
                << "actualed cmd=" << std::hex << rCmd.getCmdId() << std::dec;
            m_sErrMsg = oss.str();
	        
	        return 0xEE0031;
	    }
	    
	    char* pBuf = NULL; uint32_t nLen = 0;
	    rCmd.getBuffer(pBuf, nLen);
	    CByteStreamNetwork bs(pBuf, nLen);
	    bs.isStoring(false);
	    
	    CGisMapGatewayAoGetSosoCoordinatesResp oResp;
	    if(!oResp.Serialize(bs))
	    {
	        m_sErrMsg = "Resp.Serialize(bs) failed";
	        return 0xEE0032;
	    }
			coordinatesPo  = oResp.coordinatesPo;
			errMsg  = oResp.errMsg;
			outReserve  = oResp.outReserve;
	    
	    return oResp.dwResult;
	}
	
	uint32_t CGisMapGatewayAoStub4App::RecvGetSosoCoordinates(
				CCmdObj& rCmd,
				std::vector<erp::gis::po::CCoordinatesPo >& coordinatesPo,
				std::string& errMsg,
				std::string& outReserve
	)
	{	    
	    char* pBuf = NULL; uint32_t nLen = 0;
	    rCmd.getBuffer(pBuf, nLen);
	    CByteStreamNetwork bs(pBuf, nLen);
	    bs.isStoring(false);
	    
	    CGisMapGatewayAoGetSosoCoordinatesResp oResp;
	    if(!oResp.Serialize(bs))
	    {
	        m_sErrMsg = "Resp.Serialize(bs) failed";
	        return 0xEE0033;
	    }
			coordinatesPo  = oResp.coordinatesPo;
			errMsg  = oResp.errMsg;
			outReserve  = oResp.outReserve;
	    
	    return oResp.dwResult;
	}
	
	uint32_t CGisMapGatewayAoStub4App::GetGetSosoCoordinatesRespCmd(
	)
	{	    
	    return GISMAPGATEWAYAO_GETSOSOCOORDINATES_RESP_CMD_ID;
	}	
